////////////////////////////////////////////////////////////////////////////////
// Filename: main.cpp
////////////////////////////////////////////////////////////////////////////////
#include "systemclass.h"


int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, PSTR pScmdline, int iCmdshow)
{
	SystemClass* System;
	bool result;
	
	
	// Create the system object.
	System = new SystemClass;
	if(!System)
	{
		return 0;
	}

	// Initialize and run the system object.
	result = System->Initialize();
	if(result)
	{
		System->Run();
	}

	// Shutdown and release the system object.
	System->Shutdown();
	delete System;
	System = 0;

	return 0;
}

GraphicsModel *Plane, *Ground;

bool ModelClass::LoadData()
{
	Plane = new GraphicsModel;
	if(!Plane -> LoadFromFile("Plane.txt"))
	{
		return false;
	}

	Ground = new GraphicsModel;
	if(!Ground -> LoadFromFile("Ground.txt"))
	{
		return false;
	}

	ModelList.push_back(Plane);
	ModelList.push_back(Ground);


	return true;
}

void ModelClass::Frame(unsigned long runtime)
{
	Plane -> Rotate(10.0f);
}